Person = Backbone.Model.extend ({
	
	
	defaults: {
		name : "Default",
		age : 0, 
		address: 'Ninh Binh'
	},
	validate: function(attrs) {
	},
	initialize: function(){
		document.writeln("Welcome "+this.get("name")+" to this world <br/>");
		this.on("error", function(model, error){
			console.log( error );
		});
		this.on("change:name", function(){
			document.writeln("My name has set is " + this.get("name")+"<br\>");
			document.writeln("It's beautiful name :)");
		});
		
	},
	setName: function(iName){
		this.set({name: iName});
	}
	
});

//var person = new Person();
//person.set({name: "Tran Van Thanh"});
//person.set({sex: false});
//person.setName("Tran Van Thanh");
//var val = person.toJSON();
//var val = person.attributes;
//document.writeln(val.age);
//console.log("abc");
